package leetcode;

/**
 * @author Liangyaoyun
 */
public class leetCode70 {
    public int climbStairs(int n) {
        int a=1;
        int b=1;
        int c=a+b;
        for (int i = 2; i <= n; i++) {
            c=a+b;
            a=b;
            b=c;
        }
        if(n==1){
            return a;
        }
        return c;
    }
}
